package com.zhagnfei.cofig;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.reactive.function.server.RouterFunction;
import org.springframework.web.reactive.function.server.RouterFunctions;
import org.springframework.web.reactive.function.server.ServerResponse;



@Configuration
public class RouteConfig {

    @Bean
    public RouterFunction<ServerResponse> routeExampleHandler(ExampleHandler exampleHandler) {
        RouterFunctions.Builder route = RouterFunctions.route();
        route = route.GET("/model2/getUser", exampleHandler::getUser);
        return route.build();
    }

}
